﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Silverlight.Testing;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PlottingBasics.Functions;

namespace t_PlottingBasics
{
    [TestClass]
    public class t_Helpers
    {
        [TestMethod]
        public void TestFractionBetween()
        {
            Assert.AreEqual(0.5, Helpers.FractionBetween(0.0, 1.0, 0.5), "basic fraction calc is not correct");
            Assert.AreEqual(0.0, Helpers.FractionBetween(0.0, 0.0, 0.0), "Calc when items are the same is not correct");
            Assert.AreEqual(0.0, Helpers.FractionBetween(0.0, 0.0, 1.0), "Calc when itmes are the same but val is out of bounds is not right");
        }
    }
}